** We Are One: The Social Maintenance of Black Democratic Party Loyalty**
 
// Julian J. Wamble (julianw@gwu.edu) 
// Chryl N. Laird (clarid@bowdoin.edu)
// Corrine M. McConnaughy (corrinem@princeton.edu)
// Ismail K. White (iwhite@princeton.edu)
 
** Each dataset file in the replication folder already includes the recodes, but if you download the file from another source the recodes are found in another do file** 

///////////////////////////ANALYSIS//////////////////////
**************************** Figure 1A- 2012 ANES*******************************
logit demind  race##c.ideo age female south married   
 margins race, at ( ideo = (0(1)6))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(Black)) 	///
plot3opts(msymbol(none)lpattern(-) mcolor() lcolor(gs10)) 	///
xtitle("") xlabel(.2 `" "Strong" "Conservative" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Liberal"', ang() labsize(2.4) tstyle(major_notick))	///
 xscale(rev)	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label() ring(1) pos(6) size(2.4)) 

*********************************Figure 1B- 2016 ANES***************************
logit demind  race##c.ideo age female  married  
 margins race, at ( ideo = (0(1)6))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(black)) 	///
plot3opts(msymbol(none)lpattern(-) mcolor() lcolor(gs10)) 	///
xtitle("") xlabel(.2 `" "Strong" "Conservative" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Liberal"', ang() labsize(2.4) tstyle(major_notick))	///
 xscale(rev)	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label() ring(1) pos(6) size(2.4)) 
 
************************** FIGURE 2- LINKED FATE & DEMOCRATIC PID **************
 //1984 NBES
 logit demind blf edu age ideo gender
 margins, at (blf= (0 .33 .66 1))
 marginsplot, recastci(rarea)title("1984 ANES")	graphregion(color(white)) ///
ci1opts(acolor(gs10))	///
plot1opts(msymbol(none)lpattern() mcolor() lcolor(black)) 	///
xtitle("") xlabel(.1 "No Linked Fate" .9 "High Linked Fate", ang() labsize(3) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend(ring(0) pos(5) size(3))
 
//1996 NBES
logit demindpre  linkmis ideo  female edu 
 margins, at (linkmis= (0 .33 .66 1))
 marginsplot, recastci(rarea)title("1996 ANES")graphregion(color(white)) ///
ci1opts(acolor(gs10))	///
plot1opts(msymbol(none)lpattern() mcolor() lcolor(black)) 	///
xtitle("") xlabel(.1 "No Linked Fate" .9 "High Linked Fate", ang() labsize(3) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend(ring(0) pos(5) size(3))
 
//2012 ANES 
logit demind ideo link_black if blacka==1
 margins, at (link= (0 .33 .66 1))
 marginsplot, recastci(rarea)title("2012 ANES")graphregion(color(white)) ///
ci1opts(acolor(gs10))	///
plot1opts(msymbol(none)lpattern() mcolor() lcolor(black)) 	///
xtitle("") xlabel(.1 "No Linked Fate" .9 "High Linked Fate", ang() labsize(3) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend(ring(0) pos(5) size(3))
 
//2016 ANES
logit demind  c.blf age ideo1 female  edu  if black==1 & V160501==1
 margins , at ( blf = (0(.1)1))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs8))	///
plot1opts(msymbol(none)lpattern() mcolor() lcolor(b)) 	///
xtitle("") xlabel(.1 "No Linked Fate" .9 "High Linked Fate", ang() labsize(2.4) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4))
 
 
************************** Table 1- CUMULATIVE ANES FILE ***********************
//Install the 'diff' command to calculate the DID estimators. The interaction terms provide the confidence intervals.

**For Black Repondents**

*Republican*
ci mean repind if black==1 & ftf==1 & blackintall==1 & year==2012
ci mean repind if black==1 & ftf==1 & blackintall==0
ttest repind if black==1 & ftf==1, by(blackintall)


*Independent*
ci mean indind if black==1 & ftf==1 & blackintall==1
ci mean indind if black==1 & ftf==1 & blackintall==0
ttest indind if black==1 & ftf==1, by(blackintall)

*Democrat*
ci mean demind if black==1 & ftf==1 & blackintall==1
ci mean demind if black==1 & ftf==1 & blackintall==0
ttest demind if black==1 & ftf==1, by(blackintall)


**For White Respondents**

*Republican*
ci mean repind if white==1 & ftf==1 & blackintall==1
ci mean repind if white==1 & ftf==1 & blackintall==0
ttest repind if white==1 & ftf==1, by(blackintall)

*Independent*
ci mean indind if white==1 & ftf==1 & blackintall==1
ci mean indind if white==1 & ftf==1 & blackintall==0
ttest indind if white==1 & ftf==1, by(blackintall)

*Democrat*
ci mean demind if white==1 & ftf==1 & blackintall==1
ci mean demind if white==1 & ftf==1 & blackintall==0
ttest demind if white==1 & ftf==1, by(blackintall)

*Difference in Difference Tests*

*Republican*
diff repind if ftf==1, t(blackintall) p(bw)

*Independent*
diff indind if ftf==1, t(blackintall) p(bw)

*Democrats*
diff demind if ftf==1, t(blackintall) p(bw)

*Confidence Intervals for DID Coefficient*
*republican*
reg repind i.blackintall##i.bw if ftf==1
*independent*
reg indind i.blackintall##i.bw if ftf==1
*democrat*
reg demind i.blackintall##i.bw if ftf==1

************************Table 2A- CUMULATIVE ANES FILE*************************

*Unadjusted-BLACK RESPONDENTS*
mean demind if black==1 & ftf==1, over(blackintall)
ttest demind if black==1 & ftf==1, by (blackintall)

*Unadjusted-WHITE RESPONDENTS*
mean demind if white==1 & ftf==1, over(blackintall)
ttest demind if white==1 & ftf==1, by (blackintall)

*Unadjusted- DIFFERENCE IN DIFFERENCE*
reg demind i.blackintall##i.bw if ftf==1

*******Proposensity Score Macthing Models*********

//Install the 'psmatch' command to replicate the propsensity scores- this code also creates a series of variables once run, which is where the _pscore comes from
*ssc install psmatch2, replace

*Prospensity Scores Model- BLACK RESPONDENTS*
**Adjusted Model w/ Controls**
psmatch2 demind blackintall age female south married i.intgen i.year if black==1 & ftf==1, common logit

*Prospensity Scores Model*
mean _pscore if ftf==1 & black==1, over(blackintall)

*Significance Tetsing for Model Specified Propensity Scores*
ttest _pscore if ftf==1 & black==1, by(blackintall)


*Prospensity Scores Model- WHITE RESPONDENTS*
**Adjusted Model w/ Controls**
psmatch2 demind blackintall age female south married i.intgen i.year if white==1 & ftf==1, common logit

*Prospensity Scores Model*
mean _pscore if ftf==1 & white==1, over(blackintall)

*Significance Tetsing for Model Specified Propensity Scores*
ttest _pscore if ftf==1 & white==1, by(blackintall)

*Propensity Matching Score Difference in Difference*
psmatch2 demind i.blackintall##i.bw age female south married i.intgen i.year if ftf==1, common logit

diff _pscore if ftf==1, t(blackintall) p(bw)

*Propensity Matching DID Confidence Intervals(95%)
reg _pscore i.blackintall##i.bw if ftf==1

***************************Table 2B- GSS CUMULATIVE FILE************************

*Unadjusted- BLACK RESPONDENTS*
mean demind if black==1 & mode==1, over(blackint)
ttest demind if black==1 & mode==1, by(blackint)


*Unadjusted WHITE RESPONDENTS*
mean demind if white==1 & mode==1, over(blackint)
ttest demind if white==1 & mode==1, by(blackint) 
*No SS result; p=.23*

*Unadjusted Difference in Difference*
diff demind if mode==1, t(blackint) p(bw)
*DID Confidence Intervals (95%)
reg demind i.blackint##i.bw if mode==1

*******Proposensity Score Macthing Models*********

*Prospensity Scores Model- BLACK RESPONDENTS*
**Adjusted Model w/ Controls**
psmatch2 demind blackint age sex south married year04 year08 year10 year12 year14 if mode==1 & black==1, common logit

*Prospensity Scores Model*
mean _pscore if mode==1 & black==1, over(blackint)
*Significance Tetsing for Model Specified Propensity Scores*
ttest _pscore if mode==1 & black==1, by(blackint)

*Prospensity Scores Model- WHITE RESPONDENTS*

**Adjusted Model w/ Controls**
psmatch2 demind blackint age sex south married year04 year08 year10 year12 year14 if mode==1 & white==1, common logit
*Prospensity Scores Model*
mean _pscore if mode==1 & white==1, over(blackint)
*Significance Tetsing for Model Specified Propensity Scores*
ttest _pscore if mode==1 & white==1, by(blackint)

**Difference in Difference Estimation**
psmatch2 demind i.blackint##i.bw age sex south married year04 year08 year10 year12 year14 if mode==1, common logit
diff _pscore if mode==1, t(blackint) p(bw)

*Propensity Matching DID Confidence Intervals(95%)
reg _pscore i.blackint##i.bw if mode==1


**************************** Table 3; PEW DATA*********************************

*PID varaible-1= Republican w/ Leaners; 2= Independent; 3=Democrats w/ Leaners*

*Republican w/Leaners*
ttest pid1 if black1==1, by(blacki)

*Independents*
ttest pid2 if black1==1, by(blacki)

*Democrat w/Leaners*
ttest pid3 if black1==1, by(blacki)

**White Respondents**
gen white=racecmb
recode white 2=0 1=1 else=.
tab white

**TTESTS for Black Interviewer's Effect 
*Republican w/Leaners*
ttest pid1 if white==1, by(blacki)

*Independents*
ttest pid2 if white==1, by(blacki)

*Democrat w/Leaners*
ttest pid3 if white==1, by(blacki)

gen bw=.
replace bw=0 if white==1
replace bw=1 if black1==1
tab bw

**Difference in Difference testing by Respondent Race**

*Republicans w/ Leaners*
diff pid1, t(blacki) p(bw)
reg pid1 i.blacki##bw

*Independents*
diff pid2, t(blacki) p(bw)
reg pid2 i.blacki##bw

*Democrats w/ Leaners*
diff pid3, t(blacki) p(bw)
reg pid3 i.blacki##bw

*************************** TABLE 3- GALLUP ANALYSIS**************************

*The Effect of Black Interviewer on PID for Black Respondents* 

**REPUBLICAN-BLACK RESPONDENTS** 
mean replean if black==1, over(blackint)
ttest replean if black==1,by(blackint)

**INDEPENDENT-BLACK RESPONDENTS** 
mean independent if black==1, over(blackint)
ttest independent if black==1,by(blackint)

**DEMOCRAT-BLACK RESPONDENTS** 
mean demlean if black==1, over(blackint)
ttest demlean if black==1,by(blackint)


*The Effect of Black Interviewer on PID for White Respondents* 

**REPUBLICAN-WHITE RESPONDENTS** 
mean replean if white==1, over(blackint)
ttest replean if white==1,by(blackint)

**INDEPENDENT-WHITE RESPONDENTS** 
mean independent if white==1, over(blackint)
ttest independent if white==1,by(blackint)

**DEMOCRAT-WHITE RESPONDENTS** 
mean demlean if white==1, over(blackint)
ttest demlean if white==1,by(blackint)

*Difference in Difference for Black & White Respondents* 

*Republicans*
diff replean, t(blackint) p(bw)
*CIs* 
reg replean i.blackint##i.bw

*Independents*
diff independent, t(blackint) p(bw)
*CIs*
reg independent i.blackint##i.bw

*Democrats*
diff demlean, t(blackint) p(bw)
*CIs*
reg demlean i.blackint##i.bw

******************** Table 4- 2012 ANES RESULTS ************************ 

*Black Respondents- DEMOCRATS*

*Average Effects & Statistical Testing*
*White/Online Interviewer*
mean demind if blacka==1, over(whtonline)
ttest demind if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean demind if blacka==1, over(blkonline)
ttest demind if blacka==1, by(blkonline)

*Black/White Interviewer*
mean demind if blacka==1, over(blkwht)
ttest demind if blacka==1, by(blkwht)

*Black Respondents- REPUBLCIAN*
*Average Effects & Statistical Testing*
*White/Online Interviewer*
mean repind if blacka==1, over(whtonline)
ttest repind if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean repind if blacka==1, over(blkonline)
ttest repind if blacka==1, by(blkonline)

*Black/White Interviewer*
mean repind if blacka==1, over(blkwht)
ttest repind if blacka==1, by(blkwht)

*Black Respondents- INDEPENDENT*
*Average Effects & Statistical Testing*
*White/Online Interviewer*
mean indind if blacka==1, over(whtonline)
ttest indind if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean indind if blacka==1, over(blkonline)
ttest indind if blacka==1, by(blkonline)

*Black/White Interviewer*
mean indind if blacka==1, over(blkwht)
ttest indind if blacka==1, by(blkwht)

**White Respondents**

*White Respondents- DEMOCRATS*

*Average Effects & Statistical Testing*
*White/Online Interviewer*
mean demind if blacka==1, over(whtonline)
ttest demind if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean demind if blacka==1, over(blkonline)
ttest demind if blacka==1, by(blkonline)

*Black/White Interviewer*
mean demind if blacka==1, over(blkwht)
ttest demind if blacka==1, by(blkwht)

*White Respondents- REPUBLCIAN*

*Average Effects & Statistical Testing*
*White/Online Interviewer*
mean repind if whitea==1, over(whtonline)
ttest repind if whitea==1, by(whtonline)

*Black/Online Interviewer*
mean repind if whitea==1, over(blkonline)
ttest repind if whitea==1, by(blkonline)

*Black/White Interviewer*
mean repind if whitea==1, over(blkwht)
ttest repind if whitea==1, by(blkwht)

*White Respondents- INDEPENDENT*

*Average Effects & Statistical Testing*
*White/Online Interviewer*
mean indind if whitea==1, over(whtonline)
ttest indind if whitea==1, by(whtonline)

*Black/Online Interviewer*
mean indind if whitea==1, over(blkonline)
ttest indind if whitea==1, by(blkonline)

*Black/White Interviewer*
mean indind if whitea==1, over(blkwht)
ttest indind if whitea==1, by(blkwht)

**Difference in Difference- Black and White Respondents** 

*REPUBLICAN*
diff repind, t(whtonline) p(bw)
diff repind, t(blkonline) p(bw)
diff repind, t(blkwht) p(bw)

*Confidence Intervals*
reg repind i.blkonline##i.bw
reg repind i.whtonline##i.bw
reg repind i.blkwht##i.bw

*INDEPENDENTS*
diff indind, t(blkonline) p(bw)
diff indind, t(whtonline) p(bw)
diff indind, t(blkwht) p(bw)

*Confidence Intervals*
reg indind i.blkonline##i.bw
reg indind i.whtonline##i.bw
reg indind i.blkwht##i.bw

*DEMOCRATS*
diff demind, t(blkonline) p(bw)
diff demind, t(whtonline) p(bw)
diff demind, t(blkwht) p(bw)

*Confidence Intervals*
reg demind i.blkonline##i.bw
reg demind i.whtonline##i.bw
reg demind i.blkwht##i.bw
 
 
***************************** TABLE 5- 2012 ANES ****************************** 

*********************Affirmative Action- University****************************
gen affuni=aa_uni
 recode affuni -9/-1=. 3=0 2=0
 
 **ANALYSIS**
 *White/Online Interviewer*
mean affuni if blacka==1, over(whtonline)
ttest affuni if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean affuni if blacka==1, over(blkonline)
ttest affuni if blacka==1, by(blkonline)

*Black/White Interviewer*
mean affuni if blacka==1, over(blkwht)
ttest affuni if blacka==1, by(blkwht)

***********************Affirmative Action- Work*********************************
gen affwork=aa_work 
 recode affwork -9/-1=. 3=0 2=0
 
  **ANALYSIS**
 *White/Online Interviewer*
mean affwork if blacka==1, over(whtonline)
ttest affwork if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean affwork if blacka==1, over(blkonline)
ttest affwork if blacka==1, by(blkonline)

*Black/White Interviewer*
mean affwork if blacka==1, over(blkwht)
ttest affwork if blacka==1, by(blkwht)


**************Government should help Black People******************************
gen govhb=aidblack_self
recode govhb -9/1=. 1/3=1 4/7=0

  **ANALYSIS**
*White/Online Interviewer*
mean govhb if blacka==1, over(whtonline)
ttest govhb if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean govhb if blacka==1, over(blkonline)
ttest govhb if blacka==1, by(blkonline)

*Black/White Interviewer*
mean govhb if blacka==1, over(blkwht)
ttest govhb if blacka==1, by(blkwht)



*************************White Feeling Thermometer******************************
gen fwhite=ftcasi_white
recode fwhite -9/-1=.

  **ANALYSIS**
*White/Online Interviewer*
mean fwhite if blacka==1, over(whtonline)
ttest fwhite if blacka==1, by(whtonline)

*Black/Online Interviewer*
mean fwhite if blacka==1, over(blkonline)
ttest fwhite if blacka==1, by(blkonline)

*Black/White Interviewer*
mean fwhite if blacka==1, over(blkwht)
ttest fwhite if blacka==1, by(blkwht)

**************************FIGURES 3A & 3B- CUMULATIVE ANES**********************
//FIGURE 3A
**7 POINT PID**
reg pid  blackintall##c.ideo age female south married i.intgen i.year  if black==1 
 margins blackintall, at ( ideo = (0(1)6))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(black)) 	///
xtitle("") xlabel(0 " ".2 `" "Strong" "Conservative" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Liberal"' 6 " ", ang() labsize(2.4) tstyle(major_notick))	///
 xscale(rev)	///
 ylabel(-.6(.2).6,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4)) ///
addplot( histogram ideo if e(sample), width(.9) lcolor(gs10) color(gs14) ) 

//FIGURE 3B
**DEM vs Ind & Rep**
logit demind  blackintall##c.ideo age  female south married i.intgen i.year  if black==1 
 margins blackintall, at ( ideo = (0(1)6))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(black)) 	///
xtitle("") xlabel(0 " ".2 `" "Strong" "Conservative" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Liberal"' 6 " ", ang() labsize(2.4) tstyle(major_notick))	///
 xscale(rev)	///
 ylabel(-.6(.2).6,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4)) ///
addplot( histogram ideo if e(sample), width(.9) lcolor(gs10) color(gs14) ) 

**************************FIGURES 3C & 3D- CUMULATIVE GSS***********************
//FIGURE 3C
**7 POINT PID**
reg pid1  blackint##c.ideology age sex married south i.year if black==1 & mode==1
 margins blackint, at (ideology= (0 (1) 6))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(black)) 	///
plot1opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
xtitle("") xlabel(0 " " .2 `" "Strong" "Liberal" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Conservative"' 6 " ", ang() labsize(3) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4)) ///
addplot( histogram ideology if e(sample), width(.9) lcolor(gs13) color(gs15))

//FIGURE 3D
**DEM vs Ind & Rep**
logit demind i.blackint##c.ideology age sex south married i.year if black==1 & mode==1
margins blackint, at (ideology= (0 (1) 6))
marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(black)) 	///
plot1opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
xtitle("") xlabel(0 " " .2 `" "Strong" "Liberal" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Conservative"' 6 " ", ang() labsize(3) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4)) ///
addplot( histogram ideology if e(sample), width(.9) lcolor(gs13) color(gs15))


**************************FIGURES 3E & 3F- 2012 ANES****************************
//FIGURE 3E
**7 POINT PID**

reg pida  blackintall##c.ideo age female south married   if blacka==1 
 margins blackintall, at ( ideo = (0(1)6))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
plot3opts(msymbol(none)lpattern(o) mcolor() lcolor(black)) 	///
xtitle("") xlabel(.2 `" "Strong" "Conservative" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Liberal"', ang() labsize(2.4) tstyle(major_notick))	///
 xscale(rev)	///
 ylabel(-.6(.2).6,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4)) ///
addplot( histogram ideo if e(sample), width(1) lcolor(gs10) color(gs14) ) 

//FIGURE 3F
**DEM vs Ind & Rep**
logit demind  blackintall##c.ideo age female south married   if blacka==1 
 margins blackintall, at ( ideo = (0(1)6))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
plot3opts(msymbol(none)lpattern(o) mcolor() lcolor(black)) 	///
xtitle("") xlabel(.2 `" "Strong" "Conservative" "' 1 " " 2 " " 3"Moderate" 4 " " 5" " 5.8 `" "Strong" "Liberal"', ang() labsize(2.4) tstyle(major_notick))	///
 xscale(rev)	///
 ylabel(-.6(.2).6,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4)) ///
addplot( histogram ideo if e(sample), width(1) lcolor(gs10) color(gs14) ) 

**************************FIGURES 4A-4D 2012 ANES****************************
//FIGURE 4A- ECONOMIC/FREE MARKET 
**7 POINT PID**
reg pida  blackintall##c.noregsc age female south married   if blacka==1 
 margins blackintall, at ( noregsc = (0(.1)1))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
plot3opts(msymbol(none)lpattern(o) mcolor() lcolor(black)) 	///
xtitle("") xlabel(0 "Liberal" 1 "Conservative" , ang() labsize(2.4) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4))

//FIGURE 4B- ECONOMIC/FREE MARKET 
**DEM vs Ind & Rep**
logit demind  blackintall##c.noregsc age female south married   if blacka==1 
 margins blackintall, at ( noregsc = (0(.1)1))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
plot3opts(msymbol(none)lpattern(o) mcolor() lcolor(black)) 	///
xtitle("") xlabel(0 "Liberal" 1 "Conservative" , ang() labsize(2.4) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4))

//FIGURE 4C- MORAL/TRADITIONALIST CONSERVATISM
**7 POINT PID**
reg pida  blackintall##c.moral age female south married   if blacka==1 
 margins blackintall, at ( moral = (0(.1)1))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
plot3opts(msymbol(none)lpattern(o) mcolor() lcolor(black)) 	///
xtitle("") xlabel(0 "Liberal" 1 "Conservative" , ang() labsize(2.4) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4))
 
 //FIGURE 4D- MORAL/TRADITIONALIST CONSERVATISM
 **DEM vs Ind & Rep**
  logit demind  blackintall##c.moral age female south married   if blacka==1 
 margins blackintall, at ( moral = (0(.1)1))
 marginsplot, recastci(rarea)title("")graphregion(color(white)) ///
ci1opts(acolor(gs15))	///
ci2opts(acolor(gs15))	///
ci3opts(acolor(gs15))	///
plot1opts(msymbol(none)lpattern(-) mcolor() lcolor(gs13)) 	///
plot2opts(msymbol(none)lpattern(l) mcolor() lcolor(gs13)) 	///
plot3opts(msymbol(none)lpattern(o) mcolor() lcolor(black)) 	///
xtitle("") xlabel(0 "Liberal" 1 "Conservative" , ang() labsize(2.4) tstyle(major_notick))	///
 ylabel(0(.2)1,angle(360) labsize(3) ) ytitle("Pr(Democrat)", size(3))	///
 legend( label(1 "Black" 2 "White" 3 "Online") ring(1) pos(6) size(2.4))
